//
//  FuDaoShiPingGuanKanJiLuHeaderView.m
//  SanYiTeaching
//
//  Created by 李文强 on 2019/4/23.
//  Copyright © 2019 SanYi. All rights reserved.
//

#import "FuDaoShiPingGuanKanJiLuHeaderView.h"

@implementation FuDaoShiPingGuanKanJiLuHeaderView

- (instancetype)initWithFrame:(CGRect)frame{
    if ([super initWithFrame:frame]) {
        [self initSubView];
        [self layout];
    }
    return self;
}
- (void)initSubView{
    self.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.nameLabel];
}
- (void)layout{
    [_nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.mas_centerX);
        make.centerY.equalTo(self.mas_centerY);
        make.width.equalTo(@120);
        make.height.equalTo(@15);
    }];
}
- (UILabel *)nameLabel{
    if (!_nameLabel) {
        UILabel *label = [[UILabel alloc]init];
        label.text = @"班级信息";
        label.textColor = SELECTEDCOLOR;
        label.textAlignment = 1;
        label.font = [UIFont systemFontOfSize:14];
        _nameLabel = label;
    }
    return _nameLabel;
}
- (void)drawRect:(CGRect)rect{
    UIBezierPath *path = [[UIBezierPath alloc]init];
    [path moveToPoint:CGPointMake(self.frame.size.width-100, 39)];
    [path addLineToPoint:CGPointMake(100, 39)];
    [LINCOLOR set];
    [path stroke];
}
@end
